package cn.icare.cms;

import java.util.UUID;

public class UUIDGenerator {

    public static String getUUID() {
        UUID uuid = UUID.randomUUID();
        String str = uuid.toString();
        // 去掉"-"符号
        str= str.replace("-","");
       // String temp = str.substring(0, 8) + str.substring(9, 13) + str.substring(14, 18) + str.substring(19, 23) + str.substring(24);
        return str.toUpperCase();
    }

    public  static void main(String[] args)
    {
       String str= getUUID();
       System.out.println("str="+str);
        System.out.println("length="+str.length());
    }
}
